<?php session_start();
require_once($_SERVER["DOCUMENT_ROOT"] . '/Esquina_da_TI/Gui/Fachada.php');
require_once($_SERVER["DOCUMENT_ROOT"] . '/Esquina_da_TI/ClassesBasicas/Propaganda.php');
require_once($_SERVER["DOCUMENT_ROOT"] . '/Esquina_da_TI/ClassesBasicas/Usuario.php');
$fachada = new Fachada();
$banner = new Propaganda();
$usuario = new Usuario();

if($_SESSION['ultimaAcaoMinhaConta'] != "BOLETO") {
    unset($_SESSION["menssagemErro"]);
}

$menssagemErro = $_SESSION["menssagemErro"];

$login = $_SESSION['login'];


?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="/Esquina_da_TI/default.css" rel="stylesheet" type="text/css" media="screen" />
        <script type="text/javascript" src="formulario.js"></script>
        <script type="text/javascript" src="../js/validador.js"></script>
        <script type="text/javascript" src="../ajax/funcs.js"></script>
        <title>Boletos</title>
    </head>
    <body>
        <div id="wrapper">
            <div id="page">

                <div class="post" align="center">
                    <h1>Boletos Pendentes</h1>
                    <form id="Boletos"  name="Boletos" method="POST"  action="">

                        <table cellspacing="1" cellpadding="1" >

                            <?
                            $usuario = $fachada->localizarUsuario($codigo, $nome, $login);
                            $cliente = $usuario->getCodUsuario();
                            require_once('../DAO/Conexao.php');
                            $conexao = new Conexao();
                            $conexao->abrirConexao();
                            $sql = mysql_query("select codPropaganda, valor from Propaganda where cliente='$cliente' and ativo=0;");
                                  while($linha = mysql_fetch_array($sql)){
                                   
                                $codigo  = $linha["codPropaganda"];
                                $valor = $linha["valor"];




                                echo "<font face='verdana' size='1' color='FFFFFF' align='center'>";
                                echo "<th  class='download'>Numero do Boleto</th><th class='download'>Valor</th><th class='download'>Emitir</th><tr><td align='center'><b>00000$codigo</b></td><td align='center'><b>R$ $valor,00</b></td><td align='center'><a href='javascript:novaJanela2()'><img src='../images/play.png' width='32' height='32' alt='Emitir'/></a></td></tr>";
                                
                                echo "</font>";
                                   }

                                $conexao->fecharConexao();
                                
                            ?>
                        </table>
                    </form>
                </div>
            </div>
        </div>



    </body>

</html>

